package com.xcc.commandpattern.demo01;

/**
 * @Description: SimpleRemoteControl
 * @Author xiechuang
 * @Date 2022/9/7
 */
public class SimpleRemoteControl {

    Command slot;

    public SimpleRemoteControl() {}

    public void setCommand(Command command) {
        slot = command;
    }

    public void buttonWasPressed() {
        slot.execute();
    }

}
